package com.example.canal;

import com.example.canal.conf.DatasourceCustomerProperties;
import com.example.canal.conf.KafkaSyncProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * 利用canal实现数据同步
 *
 * @author maowei
 * @package_name com.vlinklink.sync
 * @date 2020/9/7
 * @time 10:03
 */
@ComponentScan(basePackages = {"com.example.canal"})
@SpringBootApplication
@EnableConfigurationProperties(value = {KafkaSyncProperties.class, DatasourceCustomerProperties.class})
public class DataSyncApplication extends SpringBootServletInitializer {


    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(DataSyncApplication.class);
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(DataSyncApplication.class, args);
    }



}
